package com.mipo.service;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.mipo.dao.imp.MessageReceiveDAO;
import com.mipo.dao.imp.MessageReceiveDAOImp;
import com.mipo.vo.Employee;
import com.mipo.vo.MessageReceive;

public class HavingSendMessageService extends HttpServlet {

	public void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		HttpSession session = request.getSession();
		Employee emp = (Employee) session.getAttribute("tzx");
		try {
			MessageReceiveDAO dao = new MessageReceiveDAOImp();
			List<MessageReceive> list = dao.queryMessageHavingSend(emp);
			request.setAttribute("hmrList", list);
			request.getRequestDispatcher("mess/havingSendMessage.jsp").forward(request,
					response);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
